{% extends "/html/base.html" %}
{%block subtitle %}: {{post.title}}{% endblock %}
{% block meta %}
<meta name="keywords" content="{% for tag in tags %}{{tag.name}}{% if not forloop.last %},{% endif %}{% endfor %}">
{% if post.description %}
<meta name="description" content="{{post.description}}">
{% comment %} OpenGraph tags {% endcomment %}
<meta property="og:description" content="{{page.description}}" />
{% endif %}
{% if page.image %}
{% if page.image.path %}
<meta property="og:image" content="{{site-url}}{{blog-prefix}}{{page.image.path}}" />
{% if page.image.type %}
<meta property="og:image:type" content="{{page.image.type}}" />{% endif %}
{% if page.image.width %}
<meta property="og:image:width" content="{{page.image.width}}" />{% endif %}
{% if page.image.height %}
<meta property="og:image:height" content="{{page.image.height}}" />{% endif %}
{% if page.image.alt %}
<meta property="og:image:alt" content="{{page.image.alt}}" />{% endif %}
{% else %}
<meta property="og:image" content="{{site-url}}{{blog-prefix}}{{page.image}}" />{% endif %}
{% endif %}
<meta property="og:url" content="{{site-url}}{{uri}}" />
<meta property="og:title" content="{{page.title}}" />
<meta property="og:type" content="article" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:url" content="{{site-url}}{{uri}}" />
<meta name="twitter:title" content="{{page.title}}" />
<meta name="twitter:description" content="{{page.description}}" />
{% if page.image %}
<meta name="twitter:image"
    content="{{site-url}}{{blog-prefix}}{% if page.image.path %}{{page.image.path}}{% else %}{{page.image}}{% endif %}" />
{% endif %}
<meta name="twitter:creator" content="{{twitter-acct}}" />
{% endblock %}
{% block content %}
<div id="post">
    {% include "/html/post-content.html" %}
    <div id="prev-next">
        {% if post.prev %}
        <a class="button" href="{{post.prev.uri}}">&laquo; {{post.prev.title}}</a>
        {% endif %}
        {% if post.next %}
        <a class="right button" href="{{post.next.uri}}">{{post.next.title}} &raquo;</a>
        {% endif %}
    </div>

    {% if disqus-shortname %}
    <div id="disqus_thread"></div>
    <script type="text/javascript">
        var disqus_config = function () {
            this.page.url = "{{site-url}}{{uri}}";
            this.page.identifier = "{{post.title}}";
        };
        (function() {
            var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
            dsq.src = '//{{disqus-shortname}}.disqus.com/embed.js';
            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
        })();
    </script>
    {% endif %}


</div>
{% endblock %}
